<div>
    <div class="commonTitle">
        <h3>
            {{welcome_info}}
        </h3>
    </div>

    <div id="editActivity" class="marginTop">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <div class="commonTitle">
                    <h3>
                        编辑活动
                    </h3>
                </div>

                <div>
                    <form role="form" name="activityForm">

                        <div class="input-group">
                            <span class="input-group-addon">活动名称</span>
                            <input type="text" class="form-control" placeholder="活动名称" ng-model="activity.name"
                                   required>

                            <span class="input-group-addon" style="margin-left: 20px">活动日期</span>
                            <input type="text" class="form-control" placeholder="活动日期" ng-model="activity.date"
                                   required>
                        </div>

                        <div class="input-group marginTop">
                            <span class="input-group-addon">消费类型</span>
                            <select class="form-control" ng-model="activity.type"
                                    required>
                                <option ng-repeat="x in activity.typeData" value="{{x.id}}">{{x.name}}</option>
                            </select>

                            <span class="input-group-addon">消费金额</span>
                            <input type="number" class="form-control" placeholder="消费金额"
                                   ng-model="activity.dues" required>
                        </div>
                        <div class="input-group marginTop">
                            <span class="input-group-addon" style="margin-left: 20px">活动详情</span>
                            <input type="text" class="form-control" placeholder="活动详情" ng-model="activity.info">
                        </div>

                        <h4>
                            选择参加活动人员
                        </h4>

                        <div class="checkbox">
                            <div style="margin: 2px 10px;display: inline-block;width: 15%"
                                 ng-repeat="x in activity.usersData">
                                <label style="min-width: 50%"><input type="checkbox" ng-model="x.checked"
                                                                     ng-change="selectUserChange()"/>{{x.name}}</label>
                                <span style="margin: 0 3px">x</span><input type="number" ng-model="x.number"
                                                                           ng-disabled="!x.checked"
                                                                           style="width: 50px"
                                                                           ng-change="selectUserChange()">
                            </div>
                        </div>

                        <div class="marginTop" ng-if="activity.selectUsers.length>0">
                            <span style="margin-right: 2px">已选择：</span>
                            <span style="margin: 0 3px;" ng-repeat="x in activity.selectUsers">{{x.name}}<span
                                    style="margin: 0 2px;">x</span>{{x.userNum}}</span>
                        </div>

                        <div class="marginTop">
                            <span>总计：</span><span>{{activity.number}}</span><span>人</span>
                        </div>

                        <div class="marginTop">
                            <button type="submit" class="btn btn-default" ng-click="editActivityClick()"
                                    ng-disabled="activityForm.$invalid">
                                Submit
                            </button>

                            <button class="btn btn-default" ng-click="cancel()">
                                Cancel
                            </button>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>